import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom";
import "./App.scss";
import { SearchPage } from "./components/SearchPage/SearchPage";
import { UserPage } from "./components/UserPage/UserPage";

function App() {
  return (
    <BrowserRouter>
      <Routes>
        <Route path="/search" element={<SearchPage />} />
        <Route path="/users/:user" Component={UserPage} />
        <Route path="*" element={<Navigate to="/search" />} />
      </Routes>
    </BrowserRouter>
  );
}

export default App;
